package com.example.plan.model.dto.drone;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 无人机设备表
 * @TableName drone
 */
@ApiModel(value = "Drone", description = "无人机设备增加/修改")
@Data
public class DroneDTO implements Serializable {

    @ApiModelProperty(value = "无人机ID，修改时必填")
    private Long drone_id;

    @NotNull(message = "无人机型号不能为空")
    @ApiModelProperty(value = "无人机型号", required = true)
    private Object model;

    @NotNull(message = "无人机状态不能为空")
    @ApiModelProperty(value = "无人机状态", required = true)
    private Object status;

    @NotNull(message = "当前位置经纬度不能为空")
    @ApiModelProperty(value = "当前位置经纬度", required = true)
    private Integer current_location;

    @NotNull(message = "最大载重不能为空")
    @ApiModelProperty(value = "最大载重（kg）", required = true)
    private BigDecimal max_load;

    @NotNull(message = "续航时间不能为空")
    @ApiModelProperty(value = "续航时间（分钟）", required = true)
    private Integer battery_life;

    @NotNull(message = "是否防水不能为空")
    @ApiModelProperty(value = "是否防水", required = true)
    private Integer is_waterproof;

    @NotBlank(message = "上次维护日期不能为空")
    @ApiModelProperty(value = "上次维护日期", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date last_maintenance;


}